package com.example.parallelTemplate.commons.service.impl;

import com.example.parallelTemplate.commons.dto.LabelDTO;
import com.example.parallelTemplate.commons.param.LabelParam;
import com.example.parallelTemplate.commons.req.AppInfoReq;
import com.example.parallelTemplate.commons.service.ILabelService;
import org.springframework.stereotype.Service;

@Service
public class LabelServiceImpl implements ILabelService {

    @Override
    public LabelDTO queryLabelInfo(LabelParam labelParam) {

        long beginTime = System.currentTimeMillis();
        try {
            System.out.println("开始查询标签信息" + beginTime);
            Thread.sleep(200);//模拟调用耗时100ms
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("结束查询标签信息,耗时：" + (System.currentTimeMillis() - beginTime));
        return new LabelDTO("程序员田螺");
    }

    @Override
    public LabelParam buildLabelParam(AppInfoReq req) {
        return new LabelParam();
    }
}
